<%@ include file="/WEB-INF/jsp/taglibs.jsp"%>
<%@page language="Java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<div id="content"><form:form commandName="karta" id="form" method="post" action="form.html">

	<input type="button" size="20" onclick="otworz('../lekarz/slownik.html','620','500')" value="Wybierz lekarza">
	<form:hidden path="lekarz" id="id_lekarza" />
	<input type="text" value="${karta.lekarz}" readonly="readonly" size="40" />
	<br/>
	
	<input type="button" size="20" onclick="otworz('../pacjent/slownik.html','620','673')" value="Wybierz pacjenta">
	<form:hidden path="pacjent" id="id_pacjenta"/>
	<input type="text" value="${karta.pacjent}" readonly="readonly" size="40" /><br><br/>
	
	<c:forEach items="${grupy}" var="g">
		<br/><c:out value="${g}"></c:out>:<br/>
			<c:forEach items="${alergeny}" var="a">
				<c:choose>
					<c:when test="${a.grupa.id == g.id}">
						<form:checkbox path="alergeny" value="${a.id}" label="${a}" />
						<br />
					</c:when>
				</c:choose>
			</c:forEach>
	</c:forEach>
	
	<br/>
	<input type="submit" value="Zapisz" name="zapisz" />
	
</form:form>
</div>

